<div class="sc_form_body">
    <form action="{$view['id']?U('save'):U('add')}?spm={$spm}" id="form" class="layui-form layui-form-pane">
        <input type="hidden" name="id" value="{$view.id|default=''}" />
        <div class="layui-form-item">
            <label class="layui-form-label label-required">登录名</label>
            <div class="layui-input-block">
                <input type="text" name="username" value="{$view.username|default=''}" placeholder="登录名" datatype="*5-18" nullmsg="请输入登录名!" errormsg="登录名请输入5~18位字符!" autocomplete="off" class="layui-input" {$view['id']?'readonly=""':''} />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" {$view['password']?'placeholder="若不修改密码请留空" datatype="*6-18" nullmsg="请输入原密码!" errormsg="密码范围在6~18位之间!" ignore="ignore"':'placeholder="登录密码" datatype="*6-18" nullmsg="请输入密码!" errormsg="密码范围在6~18位之间!"'} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input type="text" name="phone" value="{$view.phone|default=''}" placeholder="联系电话" datatype="m" errormsg="联系电话格式不正确!" ignore="ignore" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电子邮箱</label>
            <div class="layui-input-block">
                <input type="text" name="email" value="{$view.email|default=''}" placeholder="电子邮箱" datatype="e" errormsg="邮箱格式不正确!" ignore="ignore" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn">保存</button>
            </div>
        </div>
    </form>
</div>
